/*
 * Copyright (c) 2017-2021, Lindenis Tech. Ltd.
 * All rights reserved.
 *
 * File:
 *
 * Description:
 *
 * Author:
 *      xiaoshujun@lindeni.com
 *
 * Create Date:
 *      2021/12/11
 *
 * History:
 *
 */

#ifndef __MIDI_DECODE_H__
#define __MIDI_DECODE_H__

#ifdef __cplusplus
extern "C" {
#endif

#include "lindcomponent.h"

typedef struct
{
    char * midi_file;

    /*
     * user wanted output PCM format
     */
    int channels;
    int rate;
    int bits;
    int volume;
} mididec_config_t;

_handle_t mididec_create();
void mididec_destroy(_handle_t h_codec);
int  mididec_start(_handle_t h_codec, mididec_config_t * p_config);
int  mididec_stop(_handle_t h_codec);
int  mididec_receive_frame2(_handle_t h_codec, av_frame2_t ** p_frame);

#ifdef __cplusplus
}
#endif

#endif  // __MIDI_DECODE_H__

